import {apiPrefix} from './prefix';
import {post, get} from '../utils/request';

// 获取手机验证码
export const sendMobileCode = (params: Object) =>
  post(`${apiPrefix}/VerifyCode/SendMobile`, params);
// 手机验证码登录/注册
export const mobilelogin = (params: Object) =>
  post(`${apiPrefix}/Auth/LoginByPhone`, params);
// 账号密码登录
export const login = (params: Object) =>
  post(`${apiPrefix}/Auth/Login`, params);
// token登录,刷新调用
export const userinfo = (params: Object) =>
  post(`${apiPrefix}/Auth/LoginByToken`, params);
// 自动注册/登录
export const AutoRegister = (params: Object) =>
  post(`${apiPrefix}/Auth/AutoRegister`, params);
// 修改密码
export const UpdatePassword = (params: Object) =>
  post(`${apiPrefix}/User/UpdatePassword`, params);
// 修改用户信息(昵称，头像)
export const UpdateUserInfo = (params: Object) =>
  post(`${apiPrefix}/User/UpdateUserInfo`, params);
//绑定手机号
export const bindMobile = (params: Object) =>
  post(`${apiPrefix}/User/BindMobile`, params);
//用户资产信息
export const UserAssets = (params: Object) =>
  post(`${apiPrefix}/User/UserAssets`, params);
//用户消息
export const NoticeRecord = () => post(`${apiPrefix}/User/NoticeRecord`, {});
//用户消息
export const ClearUp = () => post(`${apiPrefix}/User/ClearUp`, {});
// 签到
export const postSignIn = (params: Object) =>
  post(`${apiPrefix}/User/SignIn`, params);
//用户购买记录
export const AccountChangeRecords = (params: Object) =>
  post(`${apiPrefix}/Record/AccountChangeRecords`, params);
//首页轮播图
export const BannerList = (params: Object) =>
  post(`${apiPrefix}/Home/BannerList`, params);
//排行榜榜单
export const postRankingsTitleList = (params: Object) =>
  post(`${apiPrefix}/Home/RankingsTitleList`, params);
//排行榜列表
export const postRankingsList = (params: Object) =>
  post(`${apiPrefix}/Home/RankingsList`, params);

//阅读记录
export const postReadRecords = (params: Object) =>
  post(`${apiPrefix}/Record/ReadRecords`, params);
//书架-批量取消我的收藏
export const RemoveCollect = (params: Object) =>
  post(`${apiPrefix}/Article/RemoveCollect`, params);
//我的书架
export const postUserCollect = (params: Object) =>
  post(`${apiPrefix}/Record/UserCollect`, params);
//为你推荐列表
export const postRecommend = (params: Object) =>
  post(`${apiPrefix}/Home/Recommend`, params);
//分类-类目列表
export const CategoryList = (params: Object) =>
  post(`${apiPrefix}/Home/CategoryList`, params);
//分类-漫画列表
export const ArticleList = (params: Object) =>
  post(`${apiPrefix}/Article/ArticleList`, params);
//主题精选排行榜榜单
export const postArticleThemeList = (params: Object) =>
  post(`${apiPrefix}/Home/ArticleThemeList`, params);
//主题精选榜单
export const postThemeList = (params: Object) =>
  post(`${apiPrefix}/Home/ThemeList`, params);
//首页-全站热搜
export const HotSearch = (params: Object) =>
  post(`${apiPrefix}/Home/HotSearch`, params);
//今日更新列表
export const postWeekUpdateList = (params: Object) =>
  post(`${apiPrefix}/Home/WeekUpdateList`, params);
//漫画详情-关注
export const Collect = (params: Object) =>
  post(`${apiPrefix}/Article/Collect`, params);
//首页配置
export const IndexConfig = (params: Object) =>
  post(`${apiPrefix}/Home/IndexConfig`, params);
//漫画-文章详情
export const postArticleInfo = (params: Object) =>
  post(`${apiPrefix}/Article/ArticleInfo`, params);
//漫画-章节列表
export const postChapterList = (params: Object) =>
  post(`${apiPrefix}/Article/ChapterList`, params);
//漫画-章节内容
export const postChapterInfo = (params: Object) =>
  post(`${apiPrefix}/Article/ChapterInfo`, params);
//漫画-购买章节
export const BuyChapter = (params: Object) =>
  post(`${apiPrefix}/Article/BuyChapter`, params);
//漫画-自动订阅
export const Subscribe = (params: Object) =>
  post(`${apiPrefix}/Article/Subscribe`, params);
//获取商城商品列表
export const ProductList = (params: Object) =>
  post(`${apiPrefix}/Charge/ProductList`, params);
//充值类型列表
export const PayTypeConfig = (params: Object) =>
  post(`${apiPrefix}/Charge/PayTypeConfig`, params);
//创建订单
export const CreateOrder = (params: Object) =>
  post(`${apiPrefix}/Charge/CreateOrder`, params);
//VIP专区
export const VipRankList = (params: Object) =>
  post(`${apiPrefix}/Home/VipRankList`, params);
//精选推荐列表
export const FeaturedRankList = (params: Object) =>
  post(`${apiPrefix}/Home/FeaturedRankList`, params);
//获取App配置
export const AppConfig = () => post(`${apiPrefix}/Home/AppConfig`, {});
//获取静态资源json
export const getJson = (params: string) => get(params, {});
